package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 何华树
 * Date: 2024-09-04
 * Time: 13:07
 */
public class Cat extends Animal implements Iswimming,Irunning{

    public Cat(String name, int age) {
        super(name, age);
    }

    @Override
    public void eat() {
        System.out.println(this.name+" 正在吃猫粮...");
    }

    @Override
    public void run() {
        System.out.println(this.name+"两条小腿蹦哒蹦哒的，跑过来了");
    }

    @Override
    public void swim() {
        System.out.println(this.name+" 在水里挣扎着，很怕水");
    }
}
